package com.hopes.bizz.protocol.hj212.config;

import com.hopes.bizz.protocol.hj212.server.handler.DataHandlerChain;
import com.hopes.bizz.protocol.hj212.server.handler.HJ212DataHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Map;

/**
 * HJ212相关配置
 *
 * @author xk
 */
@Configuration
public class HJ212Config {
    @Autowired
    private Map<String, HJ212DataHandler> hj212DataHandler;

    @Bean
    public DataHandlerChain dataHandlerChain(){
        DataHandlerChain handlerChain = new DataHandlerChain();
        handlerChain.addHandlers(hj212DataHandler.values());
        return handlerChain;
    }
}
